package com.qiyuexinxi.chat.service.impl;

import com.qiyuexinxi.chat.service.FileService;
import com.qiyuexinxi.chat.util.PictureUtil;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

/**
 * @author yangxingyu
 * @date 2020/3/2
 * @description
 */
@Service
public class FileServiceImpl implements FileService {

    //上传后的服务器路径
    @Value("${web.upload-path}")
    public String filePath;
    //url访问路径
    @Value("${web.domain-name-addresses}")
    public String domainNameAddresses;
    @Override
    public String fileUpload(MultipartFile pictureImg) {



        return PictureUtil.fileUpload(pictureImg, filePath, domainNameAddresses);
    }
}
